package com.medord.flow.aspect;

import com.medord.machine.core.aspect.BaseFlowHandler;
import com.medord.machine.core.entity.ICurrentStateDto;
import org.springframework.stereotype.Component;

/**
 * @author 孙丰佳
 * @version V1.0
 * @Title: CheckFlowHandler
 * @Package com.medord.machine.aspect
 * @Description: (用一句话描述该文件做什么)
 * @date 2021-09-17 13:48
 **/
@Component
public class CheckFlowHandler extends BaseFlowHandler {
    @Override
    public boolean needExecute(ICurrentStateDto iCurrentStateDto) {
        return false;
    }

    @Override
    public void run(ICurrentStateDto iCurrentStateDto) {
        try {
//            TimeUnit.MILLISECONDS.sleep(1000);
            String msg = "CheckFlowHandler is running";
            System.out.println(msg);
            this.addWarningMsg(msg);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
